package com.dlx.model.activity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dlx.model.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author nglon
 * @since 2021-11-17
 */
@Getter
@Setter
@TableName("recharge_activity")
@ApiModel(value = "RechargeActivity对象", description = "")
public class RechargeActivity extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("活动创建人编号")
    @TableField("creator_id")
    private Long creatorId;

    @ApiModelProperty("设置充值金额")
    @TableField("recharge_amount")
    @NotNull(message = "充值金额必需设置")
    private BigDecimal rechargeAmount;

    @ApiModelProperty("设置赠送积分")
    @TableField("gift_points")
    @NotNull(message = "赠送积分数必须设置")
    private Integer giftPoints;

    @ApiModelProperty("活动开始时间")
    @TableField("start_time")
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @ApiModelProperty("活动结束时间")
    @TableField("end_time")
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "活动结束时间必须设置")
    private LocalDateTime endTime;

    @ApiModelProperty("活动状态(0:已启用 1:已禁用)")
    @TableField("is_discarded")
    private Integer isDiscarded;


}
